home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Recipient.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __RECIPIENT__
- #define __RECIPIENT__
-
- #ifndef __BLJSTANDARDINCLUDES__
- #include "BLJStandardIncludes.h"
- #endif
-
- #ifndef __COREGATEWAYTYPES__
- #include "CoreGatewayTypes.h"
- #endif
-
- #ifndef __HANDLEOBJECT__
- #include "HandleObject.h"
- #endif
-
- #ifndef __OBJECTLIST__
- #include "ObjectList.h"
- #endif
-
- /***********************************|****************************************/
-
- typedef unsigned char RecipientStatusSet;
- const RecipientStatusSet cUnknown = 0;
- const RecipientStatusSet cReceived = 1;
- const RecipientStatusSet cNotReceived = 2;
- const RecipientStatusSet cTimedOut = 3;
- const RecipientStatusSet cNotResponsible = 4;
- const RecipientStatusSet cAmbiguousRecipient = 5; // recipient described is not unique
- const RecipientStatusSet cNoSuchRecipient = 6; // no recipient with this address
- const RecipientStatusSet cBadRecipient = 7; // recipient appears to be 'bad'
- const RecipientStatusSet cMessageRejectedByDest = 8;
- const RecipientStatusSet cCanNotTranslateContentForRecipient = 9;
- const RecipientStatusSet cRecipientCanNotSendToThisAddress = 10;
-
- const RecipientStatusSet cGroupExpansionProblem = 11;
- const RecipientStatusSet cCanNotSupportBCCRecipient = 17;
-
- const RecipientStatusSet cNoTranslatableContent = 12;
- const RecipientStatusSet cRequireTEXTContent = 13;
- const RecipientStatusSet cRequireIMAGContent = 14;
- const RecipientStatusSet cRecipientCanNotReceiveEnclosures = 18;
-
- const RecipientStatusSet cLetterTooLarge = 15;
- const RecipientStatusSet cGatewayDiskTemporarilyTooFull = 16;
-
-
- /***********************************|****************************************/
-
- typedef unsigned char RecipientTypeSet;
- const RecipientTypeSet fromRecipient = 0;
- const RecipientTypeSet toRecipient = 1;
- const RecipientTypeSet ccRecipient = 2;
- const RecipientTypeSet bccRecipient = 3;
-
- /***********************************|****************************************/
-
- class TRecipient : public THandleObject
- {
- public:
- virtual ~TRecipient();
-
-
- // Recipient Name/Type or CID Methods
- // ==================================
- virtual Boolean GetRecipientName (TRString& name) const = 0; // return name and true if address has name, false otherwise
- virtual Boolean GetRecipientType (TRString& type) const = 0; // return type and true if address has a type, false otherwise
-
- virtual Boolean GetCID (CreationID& cid) const = 0; // return true and cid if address has cid, false otherwise
-
- // Path Information
- // ================
- virtual Boolean IsPathInfoPresent () const = 0; // return true if the recipient has any path information
- virtual Boolean IsPathInfoOptional () const = 0; // return true if the path info is present but not required
- virtual Boolean IsNameAndPathUnique () const = 0; // return true if the name & path info uniquely identify a recipient
-
- virtual Boolean GetPathDNode (unsigned long& dNode) const; // return true if recipient has dNode, false otherwise
-
- virtual unsigned short GetPathNameCount () const; // return the number of path name items
- virtual void GetPathNameItem (unsigned short item, TRString& nodeName) const; // get item-th (one based) pathname, return true if available.
-
- virtual Boolean GetDirectoryName (DirectoryName& directoryName) const; // return directory name and true if available, false otherwise
-
-
- // Recipient Extension Data
- // ======================
- virtual Boolean IsAddressTypePresent () const = 0; // return true if an address type is present
- virtual OSType GetAddressType () const = 0; // return the address type
- virtual unsigned long GetExtensionDataSize () const = 0;
- virtual void GetExtensionData (unsigned long offset, void *buffer, unsigned long bufferSize) const = 0;
-
- // Recpient Status
- // ===============
- virtual Boolean GetResponsible () const = 0; // return true if this recipient must be delivered to, false otherwise
- virtual Boolean SetStatus ( RecipientStatusSet ) = 0; // set recipient status
- virtual RecipientStatusSet GetStatus () const = 0; // get recipient status
-
-
- // Debugging purposes only
- virtual ostream& Describe(ostream&) const; // Display info about object, calls DescribeSubclass()
- virtual ostream& DescribeSubclass(ostream&) const; // Display specific info about object, should override
- virtual ostream& operator >> ( ostream& ) const;
-
- protected:
- TRecipient();
- };
-
- /***********************************|****************************************/
-
- DeclareList(TRecipient,TRecipientList);
-
- #endif // __RECIPIENT__
-